<?php
session_start();
include('inc/config.php');

//include_once('config.php');
//    $title = $_GET['title'];
//    $desc = $_GET['desc'];
//    $price = $_GET['price'];
//    $file = $_GET['file'];
//    
//    $date = date(y-m-d,time());
//    $file = time();
//    $alloweTypes=array("jpg","png","gif","jpeg");
//    
//    
//    
//    $extensions=explode(".",$_FILES ['myfile']["name"]);
//    $extension=$extensions[count($extensions)-1];
//    $newName=time().".".$extension;
//    if(move_uploaded_file($_FILES['myfile']['tmp_name'],"images/".$newName)){
//        
//    }
//    else{
//        
//    }    
//    mysql_query("insert into product (title,descreption,image,date,price,productType,sale,company)
//    
//    				VALUES ('$title','$desc','$newName','$date','$price','m',0,1) ");
//    //mysql_query($sql);
//    mysql_close($con);
//
?>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="Hasan" content="EC" />
        <!--  CSS   -->
        <link href="css/en/mycss.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/companyAddProduct.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/header.css" rel="Stylesheet" type="text/css" />
        <link href="css/en/footer.css" rel="Stylesheet" type="text/css" />
        <link rel="shortcut icon" href="favicon.ico" />
        <!--  JS   -->
        <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
        <script src="js/myjs.js"></script>
        <script src="js/header.js"></script>

        <title>Mobizoo Mobiles</title>
    </head>

    <!-- BODY -->
    <body>

        <!-- ********************************* -->
        <!-- header -->
        <!-- ********************************* -->
        <?php
        include('inc/header.php');
        ?>


        <!-- ********************************* -->
        <!-- Add Div -->
        <!-- ********************************* -->
        <form action="inc/addProduct.php"  method="post" enctype="multipart/form-data">
            <div id="addProductArea">

                <div id="productImageArea">
                    <div id="productImage"><img src="./images/productImage.png"/></div>
                    <div id="imageInput" ><input type="file" name="myfile" id="productFile"/></div>
                </div>
                <div id="productInfo">
                    <div class="infoBar">
                        <div class="infoBarTitle"> <p>Title</p> </div>    
                        <div class="infoBarInput"> <input type="text" id="productTitle" name="title"/> </div>
                    </div>

                    <div class="infoBar">
                        <div class="infoBarTitle"> <p>Descreption</p> </div>    
                        <div class="infoBarInput"> <textarea name="desc" id="productDesc"></textarea> </div>
                    </div>

                    <div class="infoBar">
                        <div class="infoBarTitle"> <p>Price</p> </div>    
                        <div class="infoBarInput"> <input type="text" name="price" id="productPrice"/> </div>
                    </div>
                </div>

            </div>
            <div id="productButtons">
                <div id="addProductButtons">
                    <input type="submit" id="AddProductButton" value="Add"/>
                    <input type="button" id="clearProductButton" value="Clear All"/>
                </div>
            </div>
        </form>

        <!-- ********************************* -->
        <!-- footer -->
        <!-- ********************************* -->
        <?php
        include('inc/footer.php');
        ?>

    </body>
</html>